<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>	
	<h6><kbd>&nbsp;用户管理&nbsp;</kbd></h6>
	<form action="">
	<input type="submit" class="btn btn-info col-sm-2" formaction="{:U(MODULE_NAME.'/User/create')}" value="添加新用户" /><table class="table table-hover table-striped table-responsive">
					<thead>
						<th>用户名</th>
						<th>昵称</th>
						<th>邮箱</th>
						<th>主页</th>
						<th>角色</th>
						<th>操作</th>
					</thead>
					<tbody>
					<foreach name="users" item="u"> 
						<tr>
						<td>{$u.username}</td>
						<td>{$u.nickname}</td>
						<td>{$u.email}</td>
						<td>{$u.url}</td>
						<td>{$u.role}</td>
						<td>
							<div class="btn-group btn-group-xs">
								<eq name="u.enable" value="0">
								<a href="{:U(MODULE_NAME.'/User/setEnable',array(id=>$u['id'],enable=>1))}"  title="当前状态为激活，点击禁用" class="btn btn-danger">禁用</a>
								<else />
								<a href="{:U(MODULE_NAME.'/User/setEnable',array(id=>$u['id'],enable=>0))}"  title="当前状态为禁用，点击激活" class="btn btn-danger">启用</a>
								</eq>
								<a href="{:U(MODULE_NAME.'/User/create',array(id=>$u['id']))}" class="btn btn-info">编辑</a>
								<a href="{:U(MODULE_NAME.'/Role/userRole',array(id=>$u['id']))}" class="btn btn-success">设置角色</a>
							</div>
						</td>
						</tr>
					</foreach>
					</tbody>
				</table>
			</form>
	</body>		
</html>
